<template>
  <div>
    <h1>v-on练习</h1>
    <h3>{{msg}}</h3>
    <button @click="fn">翻转</button>
  </div>
  
</template>

<script>
export default {
  data () {
    return {
      msg: 'hello world'
    }
  },
  methods: {
    fn () {
      this.msg = this.msg.split('').reverse().join('')
    }
  }
 
}
</script>

<style>

</style>